package com.seeyon.apps.kk.manager.datasync;


import java.util.Date;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.seeyon.apps.kk.manager.BaseManager;

public abstract class AbstractDataSyncManager extends BaseManager {
	private static final Log log = LogFactory.getLog(AbstractDataSyncManager.class);
	
	public void start() {
		log.info("=======================开始同步===================="+new Date());
		this.beforeGrabData();//删除临时表数据
		this.deleteSeeyonData();//删除底表数据
		this.deleteData();//将DBlink数据新增的临时表
		this.grabData();
		this.addData();//新增到底表
		this.updateData();//修改底表
		log.info("=======================结束同步===================="+new Date());
	}
	

	public abstract boolean beforeGrabData();
	
	public abstract boolean grabData();

	public abstract boolean addData();

	public abstract boolean updateData();

	public abstract boolean deleteData();
	
	public abstract boolean deleteSeeyonData();

}
